package com.metaverse.backend.config;

import com.metaverse.backend.utils.SnowflakeIdWorker;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class SnowflakeIdWorkerConfig {

    public static final Long workerId = 0L;

    public static final Long datacenterId = 0L;

    @Bean
    public SnowflakeIdWorker snowflakeIdWorker() {
        return new SnowflakeIdWorker(workerId, datacenterId);
    }
}
